package 蓝桥杯省赛;

import java.util.Scanner;

public class 二零二五图形 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int height = scanner.nextInt();
        int width = scanner.nextInt();
        int[][] area = new int[height][width];
        int[] arr = {2,0,2,5};
        for (int i = 0; i < height; i++){
            for (int j = 0; j < width; j++){
                area[i][j] = arr[(j + i) % 4];
            }
        }

        for (int i = 0; i < height; i++){
            for (int j = 0; j < width; j++){
                System.out.print(area[i][j]);
            }
            System.out.println();
        }
    }
}
